<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
       <div @click="divClick">
        <!-- @click.stop --->
        <button @click.stop="btnClick">+</button>
       </div>
       <!-- prevent修饰符的使用   阻止浏览器自动提交-->
       <form action="baidu">
            <input type="submit" value="提交" @click.prevent="submitClick">
       </form>
       <!--监听某个键盘的键的点击-->
    <input type="text" @keyup="keyupClick"></inpu>
    <!--只触发一次-->
    <button @click.once="buttonClick">buttonClick</button>
    </div>
    <script src="../js/vue.js"></script>
 <script>
        const app=new Vue({
            el:'#app',
            data:{
               counter:0,
            },
            methods:{
                divClick(){
                    console.log("divClick")
                },
                btnClick(){
                    console.log("btnClick")
                },
                submitClick(){
                    console.log("submitClick")
                },
                keyupClick(){
                    console.log("keyupClick")
                },
                buttonClick(){
                    console.log("buttonClick")
                }
            }
        })
    </script>
</body>
</html>